package com.algo.sort;

import org.junit.Test;

import java.util.Objects;

public class Test1 {
    int i;
    String name;

    public void test(){
        Integer integer = Integer.valueOf(100);
    }

    @Test
    public void test11(){
        String s = new String("aaaa");
        Integer i = Integer.valueOf(12345);
        change(s,i);
        System.out.println(s+",,"+i);


    }

    public void change(String s,Integer i){
        s="bbbb";
        i=12367;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Test1 test1 = (Test1) o;
        return i == test1.i &&
                Objects.equals(name, test1.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(i, name);
    }


    class Info{
        int a;
        String b;
        String c;

        @Override
        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            Info info = (Info) o;
            return a == info.a &&
                    Objects.equals(b, info.b) &&
                    Objects.equals(c, info.c);
        }

        @Override
        public int hashCode() {
            String s="werewr";
            s.indexOf("w");
            return Objects.hash(a, b, c);

        }
    }
}
